/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.aptech.search;

import com.aptech.entity.Country;
import com.aptech.session.CountryFacadeLocal;
import java.util.List;
import javax.ejb.EJB;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.RequestScoped;

/**
 *
 * @author DucMinh
 */
@ManagedBean
@RequestScoped
public class SearchCountryBean {
    @EJB
    private CountryFacadeLocal countryFacade;

    /** Creates a new instance of SearchCountryBean */
    public SearchCountryBean() {
    }
     private String field;
    private Object value;
    private List<Country>listcountry;

    public String getField() {
        return field;
    }

    public void setField(String field) {
        this.field = field;
    }

    public List<Country> getListcountry() {
        return listcountry;
    }

    public void setListcountry(List<Country> listcountry) {
        this.listcountry = listcountry;
    }

    public Object getValue() {
        return value;
    }

    public void setValue(Object value) {
        this.value = value;
    }
    public String searchcountry()
    {
        listcountry=countryFacade.searchcountry(field, value);
        return "ResultCountry";
    }
}
